/*
 * XML Type:  TaxW2Response
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.TaxW2Response
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML TaxW2Response(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class TaxW2ResponseImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements net.ofx.types.x2003.x04.TaxW2Response
{
    
    public TaxW2ResponseImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName SSN$0 = 
        new javax.xml.namespace.QName("", "SSN");
    private static final javax.xml.namespace.QName TAXW2V100$2 = 
        new javax.xml.namespace.QName("", "TAXW2_V100");
    private static final javax.xml.namespace.QName TAXW2V200$4 = 
        new javax.xml.namespace.QName("", "TAXW2_V200");
    
    
    /**
     * Gets the "SSN" element
     */
    public java.lang.String getSSN()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SSN$0, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "SSN" element
     */
    public net.ofx.types.x2003.x04.GenericNameType xgetSSN()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.GenericNameType target = null;
            target = (net.ofx.types.x2003.x04.GenericNameType)get_store().find_element_user(SSN$0, 0);
            return target;
        }
    }
    
    /**
     * True if has "SSN" element
     */
    public boolean isSetSSN()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(SSN$0) != 0;
        }
    }
    
    /**
     * Sets the "SSN" element
     */
    public void setSSN(java.lang.String ssn)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SSN$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(SSN$0);
            }
            target.setStringValue(ssn);
        }
    }
    
    /**
     * Sets (as xml) the "SSN" element
     */
    public void xsetSSN(net.ofx.types.x2003.x04.GenericNameType ssn)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.GenericNameType target = null;
            target = (net.ofx.types.x2003.x04.GenericNameType)get_store().find_element_user(SSN$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.GenericNameType)get_store().add_element_user(SSN$0);
            }
            target.set(ssn);
        }
    }
    
    /**
     * Unsets the "SSN" element
     */
    public void unsetSSN()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(SSN$0, 0);
        }
    }
    
    /**
     * Gets array of all "TAXW2_V100" elements
     */
    public net.ofx.types.x2003.x04.TaxW2V100[] getTAXW2V100Array()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(TAXW2V100$2, targetList);
            net.ofx.types.x2003.x04.TaxW2V100[] result = new net.ofx.types.x2003.x04.TaxW2V100[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "TAXW2_V100" element
     */
    public net.ofx.types.x2003.x04.TaxW2V100 getTAXW2V100Array(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.TaxW2V100 target = null;
            target = (net.ofx.types.x2003.x04.TaxW2V100)get_store().find_element_user(TAXW2V100$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "TAXW2_V100" element
     */
    public int sizeOfTAXW2V100Array()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(TAXW2V100$2);
        }
    }
    
    /**
     * Sets array of all "TAXW2_V100" element
     */
    public void setTAXW2V100Array(net.ofx.types.x2003.x04.TaxW2V100[] taxw2V100Array)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(taxw2V100Array, TAXW2V100$2);
        }
    }
    
    /**
     * Sets ith "TAXW2_V100" element
     */
    public void setTAXW2V100Array(int i, net.ofx.types.x2003.x04.TaxW2V100 taxw2V100)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.TaxW2V100 target = null;
            target = (net.ofx.types.x2003.x04.TaxW2V100)get_store().find_element_user(TAXW2V100$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(taxw2V100);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "TAXW2_V100" element
     */
    public net.ofx.types.x2003.x04.TaxW2V100 insertNewTAXW2V100(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.TaxW2V100 target = null;
            target = (net.ofx.types.x2003.x04.TaxW2V100)get_store().insert_element_user(TAXW2V100$2, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "TAXW2_V100" element
     */
    public net.ofx.types.x2003.x04.TaxW2V100 addNewTAXW2V100()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.TaxW2V100 target = null;
            target = (net.ofx.types.x2003.x04.TaxW2V100)get_store().add_element_user(TAXW2V100$2);
            return target;
        }
    }
    
    /**
     * Removes the ith "TAXW2_V100" element
     */
    public void removeTAXW2V100(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(TAXW2V100$2, i);
        }
    }
    
    /**
     * Gets array of all "TAXW2_V200" elements
     */
    public net.ofx.types.x2003.x04.TaxW2V200[] getTAXW2V200Array()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(TAXW2V200$4, targetList);
            net.ofx.types.x2003.x04.TaxW2V200[] result = new net.ofx.types.x2003.x04.TaxW2V200[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "TAXW2_V200" element
     */
    public net.ofx.types.x2003.x04.TaxW2V200 getTAXW2V200Array(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.TaxW2V200 target = null;
            target = (net.ofx.types.x2003.x04.TaxW2V200)get_store().find_element_user(TAXW2V200$4, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "TAXW2_V200" element
     */
    public int sizeOfTAXW2V200Array()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(TAXW2V200$4);
        }
    }
    
    /**
     * Sets array of all "TAXW2_V200" element
     */
    public void setTAXW2V200Array(net.ofx.types.x2003.x04.TaxW2V200[] taxw2V200Array)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(taxw2V200Array, TAXW2V200$4);
        }
    }
    
    /**
     * Sets ith "TAXW2_V200" element
     */
    public void setTAXW2V200Array(int i, net.ofx.types.x2003.x04.TaxW2V200 taxw2V200)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.TaxW2V200 target = null;
            target = (net.ofx.types.x2003.x04.TaxW2V200)get_store().find_element_user(TAXW2V200$4, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(taxw2V200);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "TAXW2_V200" element
     */
    public net.ofx.types.x2003.x04.TaxW2V200 insertNewTAXW2V200(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.TaxW2V200 target = null;
            target = (net.ofx.types.x2003.x04.TaxW2V200)get_store().insert_element_user(TAXW2V200$4, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "TAXW2_V200" element
     */
    public net.ofx.types.x2003.x04.TaxW2V200 addNewTAXW2V200()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.TaxW2V200 target = null;
            target = (net.ofx.types.x2003.x04.TaxW2V200)get_store().add_element_user(TAXW2V200$4);
            return target;
        }
    }
    
    /**
     * Removes the ith "TAXW2_V200" element
     */
    public void removeTAXW2V200(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(TAXW2V200$4, i);
        }
    }
}
